﻿@using Abp.Collections.Extensions
@using Abp.Extensions
@model Abp.Web.Mvc.Models.ErrorViewModel
@{
    Layout = "~/Views/Account/_Layout.cshtml";
    ViewBag.DisableTenantChange = true;

    var errorMessage = Model.ErrorInfo.Message;
    var errorDetails = Model.ErrorInfo.Details;
    if (errorDetails.IsNullOrEmpty())
    {
        errorDetails = errorMessage;
        errorMessage = L("Error");
    }
}
<div class="row">
    <div class="col-md-12 page-404">
        <div class="number font-red"> 500 </div>
        <div class="details">
            <h3>@errorMessage</h3>
            <p>
                @errorDetails
            </p>
            @* Show validation errors *@
            @if (!Model.ErrorInfo.ValidationErrors.IsNullOrEmpty())
            {
                <ul>
                    @foreach (var validationError in Model.ErrorInfo.ValidationErrors)
                    {
                        <li>
                            @validationError.Message
                            @if (validationError.Members != null && validationError.Members.Any())
                            {
                                <text>(@string.Join(", ", validationError.Members))</text>
                            }
                        </li>
                    }
                </ul>
            }
        </div>
    </div>
</div>
